A Generalized Method for Realizing Partial Redundancy Elimination for Normal Forms in Static Single Assignment Forms
نویسندگان
چکیده
Partial Redundancy Elimination (PRE) is an effective optimization for eliminating partially redundant expressions and includes the effects of common subexpression elimination and hoisting loop invariant expressions. There have been some previous attempts to realize PRE on the Static Single Assignment (SSA) form, which is a suitable intermediate form for optimization. However, such attempts are generally difficult because of the uniqueness of variable names in the SSA form. For example, a variable that is used in several contexts in the normal form may be assigned a new name for each context in the SSA form, so it is difficult to identify the same variables in the two forms. To handle such problems, previous methods performed complicated processing by using special data structures. MASATAKA SASSA, TAKANORI IMAHASHI and YO ITO 2 To deal with this problem, we pay attention to the so-called Conventional SSA (CSSA) form and phi congruence class (pcc). Using these concepts, we can identify the same variables in the normal form and the SSA form. We therefore propose a method for transforming PRE algorithms for the normal form to those for the SSA form. This transformation is a universal one, so, in principle, it can transform any PRE algorithm that has ordinary processes (selecting insertion points and inserting expressions, and replacing expressions) to the SSA form, without changing the framework of the original PRE algorithm, independently of the algorithm. Finally, as an experiment, we apply this method to Lazy Code Motion (LCM), which is a representative PRE algorithm. We confirmed that the transformed LCM in the SSA form performs PRE correctly and produces object code with the same efficiency as PRE in normal form.
منابع مشابه
Anticipation-based partial redundancy elimination for static single assignment form
Partial redundancy elimination (PRE) is a program transformation that identifies and eliminates expressions that are redundant on at least one (but not necessarily all) execution paths of a program without increasing any path length. Chow, Kennedy, et al. devised an algorithm (SSAPRE) for performing partial redundancy elimination on intermediate representation in static single assignment (SSA) ...
متن کاملThe modified simplest equation method and its application
In this paper, the modified simplest equation method is successfully implemented to find travelling wave solutions of the generalized forms $B(n,1)$ and $B(-n,1)$ of Burgers equation. This method is direct, effective and easy to calculate, and it is a powerful mathematical tool for obtaining exact travelling wave solutions of the generalized forms $B(n,1)$ and $B(-n,1)$ of Burgers equation and ...
متن کاملC-SSAPRE: Eliminating redundancy over copies
Partial Redundancy Elimination (PRE) is an optimization that prevents, where possible, the re-computation of an expression along some paths in a program. PRE is general enough to automatically implement loop-invariant code hoisting and global common sub-expression elimination. PRE appears to be especially beneficial for functional programs, where the class of expressions that may be moved is mu...
متن کاملPartial Redundancy Elimination in SSA
The SSAPRE algorithm for performing partial redundancy elimination based entirely on SSA form is presented. The algorithm is formulated based on a new conceptual framework, the fac-tored redundancy graph, for analyzing redundancy, and represents the rst sparse approach to the classical problem of partial redundancy elimination. At the same time, it provides new perspectives on the problem and o...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2011